package com.googlecode.bbs.manage.impl;

import java.util.Set;

import com.googlecode.bbs.domain.BBSMessage;
import com.googlecode.bbs.manage.BBSManage;
import com.googlecode.bbs.server.thread.WorkerThread;

public class BBSManageImpl implements BBSManage {

	private Set<WorkerThread> workers;

	@Override
	public void sendMessageToAll(BBSMessage message) {
		for (WorkerThread worker : workers) {
			worker.writeMessage(message);
		}
	}

	public void setWorkers(Set<WorkerThread> workers) {
		this.workers = workers;
	}

}
